package pt.ist.meic.pava;

public aspect BigFatLock {
	
	pointcut shared() :  within(@pt.ist.meic.pava.Shared *);

	pointcut atomic() : call(@pt.ist.meic.pava.Atomic * * (..));// && within(@pt.ist.meic.pava.Shared *);
	
	
	after() returning(Object o) : shared() {
//		System.out.println("BFL - after returning from Shred com " + ((o == null)? "" : o.getClass().getCanonicalName()));
	}
	
	before() : atomic() {
		MyLock.getInstance().lock();
//		System.out.println("BFL - before");
		
	}
	

	after() : atomic() {
		MyLock.getInstance().Unlock();
//		System.out.println("BFL - after");
	}
}
